﻿namespace EyeOpen.Data.Nibernate.Mapping
{
    using EyeOpen.Domain;

    public abstract class OwnedMap<T> : UniqueEntityMap<T> where T : OwnedEntity
    {
        protected OwnedMap() 
        {
            References(x => x.User)
                .Not.Nullable()
                .NotFound.Exception()
                .ColumnName("UserId");
        }
    }
}